/**
 * Created by python on 19-1-14.
 */
var vm = new Vue({
    el: '#submit',
    data: {
        title: '',
        lablle: '',
        content: '',
        inputtags: '',
        inputtitle: '',
        editor1: ''
    },
    mounted() {
        CKEDITOR.replace('editor1');
        this.editor1 = CKEDITOR.instances.editor1;
    },
    methods: {

        onclick: function () {
            this.title = this.inputtitle;
            this.lable = this.inputtags;
            this.content = this.editor1;
            console.log(this.title,this.lable,this.content)
            if (this.title != '' && this.tag != '' && this.textarea != '') {
                alert('ok')
                axios.post(this.host + '/pub_question/',
                    {
                        title: this.title,
                        lable: this.lable,
                        content: this.content
                    })

            }
            else {
                alert('输入框不能为空')
            }
        }
    }
});